<!DOCTYPE html>
<html>
<head>
    <title>备件需求计划</title>
    #parse("sys/header.html")
    <style>
        .details td, .details th{
            vertical-align: text-bottom;
        }
    </style>
</head>
<body>
<div id="rrapp" v-cloak>
	<div v-show="showList">
        <Row :gutter="16" style="margin: 8px 0px 0px 1px">
            <div class="search-group">
                <i-col span="4">
                    <i-input v-model="q.planCode" @on-enter="query" placeholder="计划编码"></i-input>
                </i-col>
                <i-col span="4">
                    <i-input v-model="q.organName" @on-enter="query" placeholder="编制人"></i-input>
                </i-col>
                <i-button @click="query">查询</i-button>
                <i-button @click="reloadSearch">重置</i-button>
            </div>
        </Row>
        <Row :gutter="16" style="margin: 3px 0px 0px 0px;">
            <div class="buttons-group">
                #if($shiro.hasPermission("toolsdemandplan:export"))
                <i-button type="warning" @click="exportData"><i class="fa fa-hand-o-up"></i>&nbsp;导出</i-button>
                #end
                #if($shiro.hasPermission("toolsdemandplan:save"))
                <i-button type="info" @click="overview"><i class="fa fa fa-eye"></i>&nbsp;需求计划初稿概览</i-button>
                #end
                #if($shiro.hasPermission("toolsdemandplan:save"))
                <i-button type="info" @click="commit"><i class="fa fa-upload"></i>&nbsp;提交审核</i-button>
                #end
                #if($shiro.hasPermission("toolsdemandplan:deptCheck"))
                <i-button type="primary" @click="deptCheck"><i class="fa fa-gavel"></i>&nbsp;车间审核</i-button>
                #end
                #if($shiro.hasPermission("toolsdemandplan:peCheck"))
                <i-button type="primary" @click="peCheck"><i class="fa fa-gavel"></i>&nbsp;PE审核</i-button>
                #end
                #if($shiro.hasPermission("toolsdemandplan:pe2Check"))
                <i-button type="primary" @click="pe2Check"><i class="fa fa-gavel"></i>&nbsp;PE审批</i-button>
                #end
                #if($shiro.hasPermission("toolsdemandplan:save"))
                <i-button type="info" @click="add"><i class="fa fa-plus"></i>&nbsp;创建需求计划</i-button>
                #end
                #if($shiro.hasPermission("toolsdemandplan:delete"))
                <i-button type="error" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</i-button>
                #end
            </div>
        </Row>
	    <table id="jqGrid"></table>
    </div>
    <!-- 新增备件需求计划区域 -->
    <Card v-show="!showList">
        <p slot="title">{{title}}</p>
        <i-form :label-width="120">
            <Row>
                <i-col span="11">
                    <Form-item label="编制计划月份" prop="organMonth">
                        <Date-picker type="month" v-model="sparePartRequ.organMonth" placeholder="编制计划月份"></Date-picker>
                    </Form-item>
                </i-col>
            </Row>
            <Form-item>
                <i-button type="primary" @click="createNeedsPlan">提交</i-button>
                <i-button type="warning" @click="reload" style="margin-left: 8px">返回</i-button>
            </Form-item>
        </i-form>
    </Card>
    <!-- 审核表单区域 -->
    <div id="reviewLayer" style="display: none;">
        <form class="form-horizontal" style="width: 500px;">
            <div class="form-group">
                <div class="form-group">
                    <div class="col-sm-2 control-label">审核状态</div>
                    <div class="col-sm-8" style="margin-top: 6px">
                        <Radio-group v-model="approveParam.status">
                            <Radio :label="1"><span>通过</span></Radio>
                            <Radio :label="2"><span>不通过</span></Radio>
                        </Radio-group>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-2 control-label">备注</div>
                    <div class="col-sm-8" style="margin-top: 6px">
                        <i-input type="textarea" v-model="approveParam.remark" placeholder="审批备注"></i-input>
                    </div>
                </div>
            </div>
        </form>
    </div>
</div>
<script src="${rc.contextPath}/js/tools/toolsDemandPlan.js?_${date.systemTime}"></script>
</body>
</html>
